<?php
session_start();
$User_ID= trim ($_SESSION['User_ID']);
?>
<?php

require_once("includes/database.php"); 





{	

$owner_User_ID_status = trim ($_POST['owner_User_ID_status']);
$pet_ID_status = trim ($_POST['pet_ID_status']);
$pet_status = trim ($_POST['pet_status']);
date_default_timezone_set ("Asia/Hong_Kong");
$timezone= date_default_timezone_get();

$date =date("Y/m/d");

$tsql="UPDATE pet_info_db SET Pet_Status= '{$pet_status}'
WHERE Pet_ID='{$pet_ID_status}' and Owner_User_ID='{$owner_User_ID_status}'";

//sendEmail(getEmail($owner_User_ID_next),"You're next vaccination schedule of your Pet $pet_name_next's for $select_vaccine_order time of 
//$select_vaccine_type is on $date_of_next_vaccination (yr-mm-dd) <Br> Additional note: $additional_note","Next Vaccination Schedule");

$data =  mysql_query($tsql,$con);

if( $data )
{
    /*echo "Connection established.\n";*/
	 $message = "Your Patient Status Updated!";
	 echo "<script type='text/javascript'>alert('$message');window.location = 'thesis_vet_page.php?page=1&pet_id=';</script>";
}
else
{
   $message = "Updating your Patient Status Failed.!";
	 echo "<script type='text/javascript'>alert('$message');window.location = 'thesis_vet_page.php?page=1&pet_id=';</script>";
     die( print_r( mysql_error(), true));
}
}

?>